import React, { Component } from 'react'
import { connect } from "react-redux";
import { bindActionCreators } from "redux";
import * as action from "../../../action";

export class Gou extends Component {
    render() {
        let {NewList} =this.props;
        return (
            <div>
                {
                    NewList && NewList.length>0 ? NewList.map((item,index) => {
                        return <div key={index}>
                            <img src={item.img} alt="" />
                            <span>{item.title}</span>
                            <span>{item.cont}</span>
                        </div>
                    }):null
                }
            </div>
        )
    }
}

const mapStateToProps = ({ RoduxList }) => {
    return {
        ...RoduxList,
    };
};

const mapDispatchToProps = (dispatch) => bindActionCreators(action, dispatch);

export default connect(mapStateToProps, mapDispatchToProps)(Gou);

